#pragma once

#include <Uefi.h>
#include <Library/BaseLib.h>

#define EFI_SIMPLE_CALCULATION_PROTOCOL_GUID { 0x242f6b35, 0xca0d, 0x466c, { 0xac, 0x66, 0xcc, 0x92, 0xeb, 0x4a, 0x46, 0x4 } }
#define SIMPLE_CALCULATION_PROTOCO EFI_SIMPLE_CALCULATION_PROTOCOL_GUID

extern EFI_GUID gEfiSimpleCalculationProtocolGuid;

typedef struct _EFI_SIMPLE_CALCULATION_PROTOCOL EFI_SIMPLE_CALCULATION_PROTOCOL;
typedef EFI_SIMPLE_CALCULATION_PROTOCOL EFI_SIMPLE_CALCULATION;

typedef EFI_STATUS (EFIAPI *EFI_SIMPLE_CALCULATION_PROTOCOL_ADD)(IN EFI_SIMPLE_CALCULATION_PROTOCOL *This, IN UINTN A, IN UINTN B, OUT UINTN *Result);
typedef EFI_STATUS (EFIAPI *EFI_SIMPLE_CALCULATION_PROTOCOL_SUBTRACT)(IN EFI_SIMPLE_CALCULATION_PROTOCOL *This, IN UINTN A, IN UINTN B, OUT UINTN *Result);
typedef EFI_STATUS (EFIAPI *EFI_SIMPLE_CALCULATION_PROTOCOL_MULTIPLY)(IN EFI_SIMPLE_CALCULATION_PROTOCOL *This, IN UINTN A, IN UINTN B, OUT UINTN *Result);
typedef EFI_STATUS (EFIAPI *EFI_SIMPLE_CALCULATION_PROTOCOL_DIVIDE)(IN EFI_SIMPLE_CALCULATION_PROTOCOL *This, IN UINTN A, IN UINTN B, OUT UINTN *Result);

struct _EFI_SIMPLE_CALCULATION_PROTOCOL 
{
  UINT64                                    Revision;
  EFI_SIMPLE_CALCULATION_PROTOCOL_ADD       Add;
  EFI_SIMPLE_CALCULATION_PROTOCOL_SUBTRACT  Subtract;
  EFI_SIMPLE_CALCULATION_PROTOCOL_MULTIPLY  Multiply;
  EFI_SIMPLE_CALCULATION_PROTOCOL_DIVIDE    Divide;
};